<template>
  <div>
    <div class="mainwrap">
      <!-- 中间部分的页面主体 -->
      <div class="middlewrap">
        <!-- 左边的容器 开始-->
        <div class="leftwrap">
          <singer-cube :data="data" :detail="detail"></singer-cube>
          <singer-detail-rank :id="id"></singer-detail-rank>
        </div>
        <!-- 右边的容器 开始-->
        <div class="rightwrap">
          <hot-singer></hot-singer>
          <download></download>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import singerCube from '@/components/singerCube.vue';
import SingerDetailRank from '@/components/singerDetailRank.vue';
import HotSinger from '@/components/hotSinger.vue';
import Download from '@/components/download.vue';
export default {
  components: { singerCube, SingerDetailRank, HotSinger, Download },
  props: ["id"],
  mounted() {
    console.log(this.id);
    this.getData();
    this.getDetail();
  },
  data() {
    return {
      data: null,
      detail:null,
    };
  },
  methods: {
    getData() {
      this.axios.get(`/artist/detail?id=${this.id}`).then(res => {
        console.log(res);
        this.data = res.data.data;
      });
    },
    getDetail(){
      this.axios.get(`/artist/desc?id=${this.id}`).then(res => {
        console.log(res);
        this.detail = res.data;
    });
  }
},
}
</script>

<style lang="scss" scoped>
.mainwrap {
  width: 100%;
  display: flex;
}
.middlewrap {
  width: 980px;
  overflow: hidden;
  /* min-height: 1500px; */
  margin: 0 auto;
  border: 1px solid #d3d3d3;
  border-width: 0 1px;
  background-color: #fff;
}

.middlewrap .leftwrap {
  width: 723px;
  float: left;
  overflow: hidden;
  // margin-bottom: 30px;
  padding-bottom: 30px;
  border-right: 1px solid #ccc;
}
.middlewrap .rightwrap {
  overflow: hidden;
  width: 250px;
  // height: 1400px;
  float: right;
  overflow: hidden;
  
}
</style>
